export const PICKOPTIONS = [
  {
    text: "1小时内",
    onClick(picker) {
      const start = new Date();
      start.setTime(start.getTime() - 3600 * 1000);
      picker.$emit("pick", [start, new Date()]);
    },
  },
  {
    text: "12小时内",
    onClick(picker) {
      const start = new Date();
      start.setTime(start.getTime() - 3600 * 1000 * 12);
      picker.$emit("pick", [start, new Date()]);
    },
  },
  {
    text: "一天内",
    onClick(picker) {
      const start = new Date();
      start.setTime(start.getTime() - 3600 * 1000 * 24);
      picker.$emit("pick", [start, new Date()]);
    },
  },
  {
    text: "一周内",
    onClick(picker) {
      const start = new Date();
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
      picker.$emit("pick", [start, new Date()]);
    },
  },
  {
    text: "一个月内",
    onClick(picker) {
      const start = new Date();
      start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
      picker.$emit("pick", [start, new Date()]);
    },
  },
];

export const UNITOPTIONS = [
  {
    label: "分钟",
    value: "min",
  },
  {
    label: "时",
    value: "hour",
  },
  {
    label: "天",
    value: "day",
  },
];

export const STATISTICALS = [
  { label: "值计数", value: "count" },
  { label: "平均数", value: "avg" },
  { label: "和值", value: "sum" },
  { label: "最大值", value: "max" },
  { label: "最小值 ", value: "min" },
];

export const CONDITIONOPERATOR = [
  { label: ">", value: ">" },
  { label: "<", value: "<" },
  { label: ">=", value: ">=" },
  { label: "<=", value: "<=" },
];

export const PARENTMENU = {
  MANAGEMENT: 1,
  ALARMCENTER: 2,
  SAFE: 3,
  DATASCANSERVICE: 4,
  DATAHANDLERSERVICE: 5,
};

export const CYCLEARR = [
  {
    label: "定时",
    value: "1",
  },
  {
    label: "按日",
    value: "2",
  },
  {
    label: "按周",
    value: "3",
  },
  {
    label: "按月",
    value: "4",
  },
  {
    label: "按季",
    value: "5",
  },
  {
    label: "按年",
    value: "6",
  },
];

export const CYCLESHORTARR = [
  {
    label: "定时",
    value: "1",
  },
  {
    label: "按日",
    value: "2",
  },
  {
    label: "按周",
    value: "3",
  },
  {
    label: "按月",
    value: "4",
  }
];

export const DAYARR = [
  "",
  "星期一",
  "星期二",
  "星期三",
  "星期四",
  "星期五",
  "星期六",
  "星期日",
];
